<!DOCTYPE html>
<html>

<head>
    {include file="common/meta2" /}

    <link href="/assets/css2/css2.css" rel="stylesheet">
    <script src="/assets/js2/jquery-3.3.1.min.js"></script>
    <script src="/assets/js2/layer.js"></script>
    <link rel="stylesheet" href="/assets/css2/layer.css" id="layui_layer_skinlayercss" style="">

    <script type="text/javascript">

        document.addEventListener('plusready', function () {
            //console.log("所有plus api都应该在此事件发生后调用，否则会出现plus is undefined。")

        });

    </script>
</head>

<body>
    <div class="head">
        <div class="return"><a href="javascript:history.back(-1)"><img src="/assets/img2/return.png"></a></div>
        <h1>达人计划</h1>
    </div>

    <div class="task">
        <ul>
            <li>
                <div class="label">当前任务</div>
                <div class="title"><span>1</span>.第2个购买任务完成(书香聚财福)</div>
                <div class="dif">
                    <div class="step-box">
                        <div class="step-title">
                            <p>1</p>
                            <div class="box">
                                <div class="text">橱窗下单</div>
                                <div class="step-cont" style="width:180px">
                                    <a target="_blank"
                                        href="http://qcyx.xwy168.com/static/upload/202410131728826084728.jpg">第一步：进店下单</a>
                                    <!--div class="state">已领红包</div-->

                                </div>
                                <span style="color:red;font-weight:bold">
                                    注意：<br>
                                    1&gt; 进入橱窗仅需要购买一个商品<br>
                                    2&gt;下单后，请立即复制该订单编号，粘贴到下方。<br>
                                    (该订单编号复制到其他任务窗口无效）
                                </span>
                            </div>
                        </div>

                    </div>
                    <div class="step-box">
                        <div class="step-title">
                            <p>2</p>
                            <div class="box">
                                <div class="text">填写订单号</div>
                                <div class="input-box">
                                    <input type="number" max="10" id="order_sn" placeholder="输入或粘贴订单编码">
                                </div>

                                <div class="step-cont" style="width:180px">
                                    <a href="javascript:" onclick="tosave({$pid})">确认提交订单编号</a>
                                </div>


                            </div>
                        </div>
                    </div>

                </div>

            </li>

        </ul>
    </div>


    <script>

        function tosave(id) {
            if ($('#order_sn').val() == '') {
                layer.msg('订单号不能为空');
            } else {
                layer.confirm('确认提交订单?', function (index) {
                    $.post('/index/team/darena_addtask', { 'pid': id, 'order_sn': $('#order_sn').val() }, function (retmsg) {
                        if (parseInt(retmsg.code) == 1) {
                            layer.msg(retmsg.msg);
                            if (retmsg.sendurl == 1) {
                                window.location.href = '?m=index&c=login&logout_type=1';
                            } else {
                                window.location.href = '?m=teamtt&c=teamleventask';
                            }

                        } else {
                            layer.msg(retmsg.msg);
                        }
                    }, 'json');
                });
            }
        }

        function sphmsg() {
            layer.msg('上级未绑定视频号，无法完成达人任务');
        }

    </script>
    <style>
        html,
        body {
            background: #f7f7f7;
        }

        .task {
            background: #fff;
            margin: 10px 15px;
            border-radius: 15px;
            padding: 15px;
            position: relative;
        }

        .task ul li {
            padding-bottom: 20px;
        }

        .label {
            color: #2ebc8c;
            background: #eafef5;
            display: inline-block;
            padding: 2px 4px;
            border-radius: 10px 10px 0 0;
        }

        .task .title {
            padding: 10px 0;
            border-bottom: solid 1px #f8f8f8;
            font-size: 1.4rem;
        }

        .task .title span {
            font-size: 1.6rem;
        }

        .step-title {
            display: flex;
            align-items: flex-start;
            margin-top: 12px;
        }

        .step-box .box {
            flex: 2;
        }

        .step-box .text {
            font-size: 1.4rem;
            line-height: 28px;
        }

        .step-title p {
            height: 26px;
            width: 26px;
            background: #fd6a00;
            color: #fff;
            font-size: 1.4rem;
            text-align: center;
            line-height: 26px;
            border-radius: 50%;
            margin-right: 10px;
        }

        .step-cont {
            background: #fd6a00;
            position: relative;
            border-radius: 30px;
            font-size: 1.8rem;
            text-align: center;
            line-height: 48px;
            margin-top: 10px;
        }

        .step-cont .state {
            position: absolute;
            height: 50px;
            width: 50px;
            font-weight: bold;
            font-size: 1.8rem;
            line-height: 21px;
            right: 12px;
            top: -11px;
            color: #ffddbd;
            border: solid 5px;
            border-radius: 50%;
            padding: 11px 8px 5px 8px;
            transform: rotate(45deg);
        }

        .step-cont a {
            color: #fff;
        }

        .disable {
            background: #f0f0f0;
            margin-top: 20px;
        }

        .disable a {
            color: #cccccc;
        }

        .input-box input {
            width: 92%;
            line-height: 48px;
            background: #f9f9f9;
            border: solid 1px #f2f2f2;
            padding: 0 4%;
            margin-top: 10px;
            border-radius: 5px;
        }

        input::placeholder {
            color: #ccc;
        }

        .step-box {
            position: relative
        }


        .step-box:first-child::before {
            content: '';
            display: block;
            position: absolute;
            width: 1px;
            height: 100%;
            background: #fe6b01;
            left: 13px;
            bottom: -19px;
        }
    </style>

</body>

</html>